/**
 * @type {Date}
 *
 * @properties={typeid:35,uuid:"5E8F4F9A-CFE3-4584-B76E-28C6632A2FBB",variableType:93}
 */
var gFechaEntrega_cheq = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"456E4562-CF59-4019-8CD1-A0DE7172730E",variableType:4}
 */
var gEstado_cheq = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"7CF622D7-6A2D-4020-B52C-B646C5AAF084",variableType:4}
 */
var gBancoSaldo = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"EB2DA12B-879C-435C-867A-C040E8A313F1",variableType:4}
 */
var gCuenta_cyb = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"A22E9984-5D43-44A5-BD9A-BB280FD88324",variableType:4}
 */
var gCuentaConc = null;

/**
 * @properties={typeid:24,uuid:"04026859-830C-453C-B956-B0DBAB51D787"}
 * @AllowToRunInFind
 */
function mostrarCheque(cheque) {
	if (cheque != null)
	{
		forms.cheques_det_dialog.controller.find()
		forms.cheques_det_dialog.cheque_id = cheque
		var f = forms.cheques_det_dialog.controller.search()
		if (f == 1)
		{
			globals.formEnVentana('cheques_det_dialog','CHEQUE','Detalle Cheque')	
		}
		else
			globals.DIALOGS.showWarningDialog('Aviso','El cheque no existe','OK')
	}
}

/**
 * Record pre-insert trigger.
 * Validate the record to be inserted.
 * When false is returned the record will not be inserted in the database.
 * When an exception is thrown the record will also not be inserted in the database but it will be added to databaseManager.getFailedRecords(),
 * the thrown exception can be retrieved via record.exception.getValue().
 *
 * @param {JSRecord<db:/infocom/movim_cyb>} record record that will be inserted
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"748FE4FF-77A8-43AF-B751-0A694F640C25"}
 */
function movim_cyb_onRecordInsert(record) {
	record.apertura_id = movim_cyb_to_cuentas_cyb.apertura_id
	return true
}
